package com.lindroy.jetpacknotes.lifecycle.lifecycle_service

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.lindroy.jetpacknotes.R
import kotlinx.android.synthetic.main.activity_lifecycle_service.*

class LifecycleServiceActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_lifecycle_service)
        btnStart.setOnClickListener {  startService(Intent(this,MyService::class.java)) }
        btnStop.setOnClickListener { stopService(Intent(this,MyService::class.java)) }
    }
}